import service from '../network/service'

// 获取省份列表
export const getProvinceList = (params) => {
    return service({
        url: '/province/list',
        method: 'post',
        params: params
    })
};
/*
{ include: 0, common: 1 }
当include==1 时 会显示全国 当include==0 不显示; 当common==0 时 会显示澳门香港 当common==1 不显示
*/

// 获取市区列表
export const getCityList = (params) => {
    return service({
        url: '/area/getByParent',
        method: 'post',
        params: params
    })
};
/*
   /area/getByParent?parentAreaCode=110000
   url 参数 parentAreaCode 上级省份编码
*/

// 获取学校列表
export const getSchoolList = (data) => {
    return service({
        url: '/school/list',
        method: 'post',
        data: data
    })
};
/*
{
    "keyWord":"实验中学",
    "provinceCode":"",
    "cityCode":"",
    "areaCode":""
}
*/

// 获取年级列表
export const getGradeList = (params) => {
    return service({
        url: '/common/listGrades',
        method: 'post',
        params: params
    })
};
/*
   /common/listGrades?include=1
 url 参数 include=1 时 会显示 ”全部年级“
 当include 不传递或者等于0时 不显示"全部年级"
*/

// 获取班级列表
export const getClassList = (params) => {
    return service({
        url: '/school/getClassInfoListBySchoolIdAndGradeList',
        method: 'post',
        params: params
    })
};
/*
   /school/getClassInfoListBySchoolIdAndGradeList?schoolId=12666&grade=2023
    url 参数传递
    schoolId 学校id
    grade 年级
*/

// 获取用户协议
export const getAgreement = (params) => {
    return service({
        url: '/sys/getContent',
        method: 'post',
        params: params
    })
};